@maskZIndex: 20000;

.@{prefix}-modal-mask {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: @maskZIndex;
  height: 100%;
  background-color: var(--md-modal-mask);
}

.@{prefix}-modal {
  display: block;
  background-color: var(--md-bk-color);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif,
    'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
  border-radius: 3px;
  border: 1px solid var(--md-border-color);
  position: fixed;
  z-index: @maskZIndex + 1;
  flex-direction: column;

  &-header {
    cursor: grab;
    display: flex;
    justify-content: space-between;
    padding: 10px 24px;
    color: var(--md-color);
    font-weight: 600;
    font-size: 16px;
    line-height: 22px;
    word-wrap: break-word;
    user-select: none;
    border-bottom: 1px solid var(--md-border-color);
    position: relative;
  }

  &-body {
    padding: 24px;
    font-size: 14px;
    word-wrap: break-word;
    height: calc(100% - 61px);
    box-sizing: border-box;
  }

  .@{prefix}-modal-func {
    position: absolute;
    top: 10px;
    right: 10px;

    .@{prefix}-modal-adjust,
    .@{prefix}-modal-close {
      cursor: pointer;
      width: 24px;
      height: 24px;
      line-height: 24px;
      text-align: center;
      display: inline-block;
    }

    .@{prefix}-modal-adjust {
      padding-right: 10px;
    }
  }
}

.animation {
  animation-duration: 0.15s;
  animation-fill-mode: forwards;
}

@keyframes zoomIn {
  from {
    opacity: 0;
    -webkit-transform: scale3d(0.3, 0.3, 0.3);
    transform: scale3d(0.3, 0.3, 0.3);
  }

  50% {
    opacity: 1;
  }
}

.zoom-in {
  animation-name: zoomIn;
  .animation();
}

@keyframes zoomOut {
  from {
    opacity: 1;
  }

  50% {
    opacity: 0;
    -webkit-transform: scale3d(0.3, 0.3, 0.3);
    transform: scale3d(0.3, 0.3, 0.3);
  }

  to {
    opacity: 0;
  }
}

.zoom-out {
  animation-name: zoomOut;
  .animation();
}
